<div id="control_right" height:100%;>
  <a href="/soj/php/manager/manager_user_detail.php?name={? $username ?}">返回{? $username ?}用户管理</a> 
  <div id="topic">
  {? if $topic_nums>0 ?}{?*当主题数大于零时才显示一下内容*?}
{?* 大于10个结果才会使用置顶的导航栏 *?}
  {? if $topic_nums >= 10 ?}
	<div id="pager">
	{? $links1 ?}
	</div> 
  {? /if ?}
  <table bgcolor="#00CCCC">
   {? if $topic_nums ?}
    <caption>提问</caption>
	<caption>提问数 : {? $topic_nums  ?}</caption>
    {? /if ?}
       {?* 为了实现灵活性，第一个foreach显示所有的标题，这样即便结果集发生了变化，模板文件也不需要修改 *?}
	<tr>
	{? if $topic_titles|@is_array ?}
			{? foreach key=key item=title from=$topic_titles ?}
				{? if $title eq "topic_no" ?}
					<th class="topic_no_th">No.</th>
				{? else ?}
					{? if $title eq "title" ?}
					  <th class="topic_title">标题</th>
				 {? else ?}
					{? if $title eq "post_time" ?}
					  <th class="topic_title">提问时间</th>		
				{? else ?}
					{? if $title eq "status" ?}
					  <th class="topic_title">状态</th>	
                         {? else break /if ?}					  
					     {? /if ?}					  
					  {? /if ?}
					{? /if ?}
				{? /if ?}
			{? /foreach ?}
		{? else ?}
			{? "error" ?}
	{? /if ?}  
<th></th><th></th><th></th><th></th>	
</tr>
{?* 设置一个指示变量,用来生成条文表格 *?}
	{? assign var=spec value=0 ?}
	{? if $topics|@is_array ?}
		{? foreach key=key item=topic from=$topics ?}
			{? assign var=spec value=$spec+1 ?}			
			<tr {? if $spec%2 eq 0 ?} class="spec" {? /if ?}>	
							
									{? foreach key=key item=item from=$topic ?}
										{? if $key eq "topic_no" ?}
										 {? assign var="tno" value=$item ?}				
											<td>{? $item ?}</td>
										{? else ?}
											{? if $key eq "title" ?}
											  <td>{? $item ?}</td>
										 {? else ?}
											{? if $key eq "post_time" ?}
											  <td>{? $item ?}</td>		
										{? else ?}
											{? if $key eq "status" ?}
											 {? assign var="status" value=$item ?}	
											  <td>{? $item ?}</td>  
												 {? else break /if ?}	
									{? /if ?}												 
							   {? /if ?}
							{? /if ?}
						{? /if ?}										
				{? /foreach ?}
				  {? if  $status eq "close" ?}
				  <td>关闭</td>
				  <td><a href="/soj/php/manager/manager_topic_detail.php?tno={? $tno ?}&op=open&username={? $username ?}" onClick="return confirm('真的开启?')">开启</a></td>				   
				  {? else ?}
				  <td><a href="/soj/php/manager/manager_topic_detail.php?tno={? $tno ?}&op=close&username={? $username ?}" onClick="return confirm('真的关闭?')">关闭</a></td>
				  <td>开启<td>
				  {? /if ?}	               		   
				  <td><a href="/soj/php/manager/manager_topic_detail.php?tno={? $tno ?}&op=look&username={? $username ?}">查看</a></td>
				  <td><a href="/soj/php/manager/manager_topic_detail.php?tno={? $tno ?}&op=delete&username={? $username ?}" onClick="return confirm('如果删除的话会将所有的回复也删除真的要删除么?')">删除</a></td>
            </tr>				
			{? /foreach ?}
	{? else ?}
			{? "error" ?}
	{? /if ?}
  </table> 
  {? else ?}
  提问数为0。
  {? /if ?}
  </div>
  
  <div id="reply">
   {? if $reply_nums>0 ?}{?*当回答题数大于零时才显示一下内容*?}
   {?* 大于10个结果才会使用置顶的导航栏 *?}
  {? if $reply_nums  >= 10 ?}
	<div id="pager">
	{? $links2 ?}
	</div> 
  {? /if ?}
  <table bgcolor="#00CCCC">
   {? if $reply_nums  ?}
    <caption>回答</caption>
	<caption>回答数 : {? $reply_nums  ?}</caption>
    {? /if ?}
       {?* 为了实现灵活性，第一个foreach显示所有的标题，这样即便结果集发生了变化，模板文件也不需要修改 *?}
	<tr>
	{? if $reply_topic_titiles|@is_array ?}
			{? foreach key=key item=title from=$reply_topic_titiles ?}
				{? if $title eq "topic_no" ?}
					<th class="topic_no_th">No.</th>
				{? else ?}
					{? if $title eq "title" ?}
					  <th class="topic_title">标题</th>
				 {? else ?}
					{? if $title eq "post_time" ?}
					  <th class="topic_title">提问时间</th>	
                {? else?}
                    {? if $title eq "reply_time" ?}
                      <th class="reply_time">回答时间</th>						
				{? else ?}
					{? if $title eq "status" ?}
					  <th class="status">状态</th>	
                         {? else break /if ?}
                          {? /if ?}						 
					     {? /if ?}					  
					  {? /if ?}
					{? /if ?}
				{? /if ?}
			{? /foreach ?}
		{? else ?}
			{? "error" ?}
	{? /if ?}  
<th></th>
</tr>
{?* 设置一个指示变量,用来生成条文表格 *?}
	{? assign var=spec value=0 ?}
	{? if $reply_topics|@is_array ?}
		{? foreach key=key item=rep from=$reply_topics ?}
			{? assign var=spec value=$spec+1 ?}			
			<tr {? if $spec%2 eq 0 ?} class="spec" {? /if ?}>								
				{? foreach key=key item=item from=$rep ?}															
	             {? if $key eq "topic_no" ?}
					 {? assign var="tno" value=$item ?}				
						<td>{? $item ?}</td>
								{? else ?}
									{? if $key eq "title" ?}
									  <td>{? $item ?}</td>
									 {? else ?}
										{? if $key eq "post_time" ?}
										  <td>{? $item ?}</td>
										{? else?}
											{? if $key eq "reply_time" ?}
											  <td>{? $item ?}</td>								  
											{? else ?}
											{? if $key eq "status" ?}			    
											<td>{? $item ?}</td>  
											{? else break /if ?}	
									 {? /if ?}	
									{? /if ?}												 
							   {? /if ?}
							{? /if ?}
						{? /if ?}																					
				{? /foreach ?}				             		   
				  <td><a href="/soj/php/manager/manager_topic_detail.php?tno={? $tno ?}&op=look&username={? $username ?}" >查看</a></td>
				</tr>				
			{? /foreach ?}
	{? else ?}
			{? "error" ?}
	{? /if ?}
  {? else ?}
  回答数为0。
  {? /if ?}
 </div>
</div>